<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="./img/kurento.png" type="image/png" />

<link rel="stylesheet"
	href="webjars/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet"
	href="webjars/ekko-lightbox/dist/ekko-lightbox.min.css">
<link rel="stylesheet" href="webjars/demo-console/index.css">
<link rel="stylesheet" href="css/kurento.css">

<script src="webjars/jquery/dist/jquery.min.js"></script>
<script src="webjars/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="webjars/ekko-lightbox/dist/ekko-lightbox.min.js"></script>
<script src="webjars/draggabilly/draggabilly.pkgd.min.js"></script>
<script src="/webjars/webrtc-adapter/release/adapter.js"></script>
<script src="webjars/demo-console/index.js"></script>


<script src="./js/kurento-utils.js"></script>
<script src="./js/index.js"></script>
<title>Kurento Tutorial: Video Call 1 to 1 with WebRTC with
	recording</title>
</head>
<body>
	<header>
		<div class="navbar navbar-inverse navbar-fixed-top">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse"
						data-target=".navbar-collapse"></button>
					<a class="navbar-brand" href="./">Kurento Tutorial</a>
				</div>
				<div class="collapse navbar-collapse"
					id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav navbar-right">
						<li><a
							href="https://github.com/Kurento/kurento-tutorial-java/tree/master/kurento-one2one-call-recording"><span
								class="glyphicon glyphicon-file"></span> Source Code</a></li>
					</ul>
				</div>
			</div>
		</div>
	</header>
	<div class="container">
		<div class="page-header">
			<h1>Tutorial: Video Call 1 to 1 with recording</h1>
			<p>
				This web application consists on an one to one video call using <a
					href="http://www.webrtc.org/">WebRTC</a>. It uses the Kurento
				capabilities or recording of the video communication. This
				application implements two different Media Pipelines. The <a
					href="./img/pipeline1.png" data-toggle="lightbox"
					data-title="Video Call 1 to 1 with recording, First Media Pipeline"
					data-footer="Two interconnected WebRtcEnpoints Media Elements with recording (RecorderEndpoint)">first
					Media Pipeline</a> is used to communicate two peers and it is composed
				by two interconnected <i>WebRtcEndpoints</i> with two <i>RecorderEndpoints</i>
				to carry out the recording. The recorded stream will be stored in
				the file system of the Kurento Media Server. Then, a <a
					href="./img/pipeline2.png" data-toggle="lightbox"
					data-title=" Video Call 1 to 1 with recordging, Second Media Pipeline"
					data-footer="A PlayerEndpoint (reading the recorded file in the Kurento Media Server) connected to a WebRtcEnpoint in receive-only mode">second
					Media Pipeline</a> is used to play the recorded media. To run this demo
				follow these steps:
			</p>
			<ol>
				<li>Open this page with a browser compliant with WebRTC
					(Chrome, Firefox).</li>
				<li>Type a nick in the field <i>Name</i> and click on <i>Register</i>.
				</li>
				<li>In a different machine (or a different tab in the same
					browser) follow the same procedure to register another user.</li>
				<li>Type the name of the user to be called in the field <i>Peer</i>
					and click on <i>Call</i>.
				</li>
				<li>Grant the access to the camera and microphone for both
					users. After the SDP negotiation the communication should start.</li>
				<li>The called user should accept the incoming call (by a
					confirmation dialog).</li>
				<li>Click on <i>Stop</i> to finish the communication.
				</li>
				<li>Type the name of the user to play its recording in the
					field <i>Peer</i> and click on <i>Play Rec</i>
				</li>
			</ol>
		</div>
		<div class="row">
			<div class="col-md-5">
				<label class="control-label" for="name">Name</label>
				<div class="row">
					<div class="col-md-5">
						<input id="name" name="name" class="form-control" type="text"
							onkeydown="if (event.keyCode == 13) register();" />
					</div>
					<div class="col-md-7 text-right">
						<a id="register" href="#" class="btn btn-primary"><span
							class="glyphicon glyphicon-plus"></span> Register</a>
					</div>
				</div>

				<br /> <br /> <label class="control-label" for="peer">Peer</label>
				<div class="row">
					<div class="col-md-5">
						<input id="peer" name="peer" class="form-control" type="text"
							onkeydown="if (event.keyCode == 13) call();">
					</div>
					<div class="col-md-7 text-right">
						<a id="call" href="#" class="btn btn-success"><span
							class="glyphicon glyphicon-play"></span> Call</a> <a id="terminate"
							href="#" class="btn btn-danger"><span
							class="glyphicon glyphicon-stop"></span> Stop</a> <a id="play"
							href="#" class="btn btn-warning"><span
							class="glyphicon glyphicon-play-circle"></span>Play Rec</a>

					</div>
				</div>
				<br /> <label class="control-label" for="console">Console</label><br>
				<br>
				<div id="console" class="democonsole">
					<ul></ul>
				</div>
			</div>
			<div class="col-md-7">
				<div id="videoBig">
					<video id="videoOutput" autoplay width="640px" height="480px"
						poster="./img/webrtc.png"></video>
				</div>
				<div id="videoSmall">
					<video id="videoInput" autoplay width="240px" height="180px"
						poster="./img/webrtc.png"></video>
				</div>
			</div>
		</div>
	</div>

	<footer>
		<div class="foot-fixed-bottom">
			<div class="container text-center">
				<hr />
				<div class="row">&copy; 2014-2015 Kurento</div>
				<div class="row">
					<div class="col-md-4">
						<a href="http://www.urjc.es"><img src="./img/urjc.gif"
							alt="Universidad Rey Juan Carlos" height="50px" /></a>
					</div>
					<div class="col-md-4">
						<a href="http://www.kurento.org"><img src="./img/kurento.png"
							alt="Kurento" height="50px" /></a>
					</div>
					<div class="col-md-4">
						<a href="http://www.naevatec.com"><img
							src="./img/naevatec.png" alt="Naevatec" height="50px" /></a>
					</div>
				</div>
			</div>
		</div>
	</footer>
</body>
</html>
